#include "Rectangle.h"

Rectangle::Rectangle() : width(3), height(10)
{

}

Rectangle::Rectangle(double width, double height)
{
	this->width = width;
	this->height = height;
}

Rectangle::Rectangle(const Rectangle & rect)
{
	this->width = rect.getWidth();
	this->height = rect.getHeight();
}

Rectangle::~Rectangle()
{

}

double Rectangle::getArea() const
{
	return (width*height);
}

double Rectangle::getWidth() const
{
	return width;
}

void Rectangle::setWidth(double width)
{
	this->width = width;
}

double Rectangle::getHeight() const
{
	return height;
}

void Rectangle::setHeight(double height)
{
	this->height = height;
}

const Rectangle & Rectangle::operator -- (int)
{
	Rectangle temp(*this);
	width--;
	height--;
	return temp;
}
